[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Simple statements
The only kind of simple statement is an expression evaluated
for its side effects. Every expression (simple statement)
must be terminated with a semicolon. Note that this is like
C, but unlike Pascal (and awk).
Any simple statement may optionally be followed by a single
modifier, just before the terminating semicolon. The possi-
ble modifiers are:
if EXPR
unless EXPR
while EXPR
until EXPR
The if and unless modifiers have the expected semantics.
The while and until modifiers also have the expected seman-
tics (conditional evaluated first), except when applied to a
do-BLOCK or a do-SUBROUTINE command, in which case the block
executes once before the conditional is evaluated. This is
so that you can write loops like:
do {
$_ = <STDIN>;
...
} until $_ eq ".\n";
(See the do operator below. Note also that the loop control
commands described later will NOT work in this construct,
since modifiers don't take loop labels. Sorry.)
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson